package com.lz.autotest.project.system.service.impl;

import com.lz.autotest.project.system.domain.perm.*;
import com.lz.autotest.project.system.mapper.SysDeptPermMapper;
import com.lz.autotest.project.system.service.ISysDeptPermService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class SysDeptPermServiceImpl implements ISysDeptPermService
{
    @Autowired
    private SysDeptPermMapper deptPermMapper;

    /**
     * 查询部门详细信息
     *
     * @param deptId 主键
     * @return
     */
    @Override
    public SysDeptPerm selectTsysDeptPermByDeptId(String deptId)
    {
        return deptPermMapper.selectDeptPermListByDeptId(deptId);
    }

    /**
     * 查询部门权限列表
     *
     * @param tsysDeptPerm 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<SysDeptPerm> selectTsysDeptPermList(SysDeptPerm tsysDeptPerm)
    {
        return deptPermMapper.selectDeptPermList(tsysDeptPerm);
    }

    /**
     * 新增
     *
     * @param tsysDeptPerm
     * @return 结果
     */
    @Override
    public int insertTsysDeptPerm(SysDeptPerm tsysDeptPerm)
    {
        return deptPermMapper.insertDeptPerm(tsysDeptPerm);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param tsysDeptPerm 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateTsysDeptPerm(SysDeptPerm tsysDeptPerm)
    {
        return deptPermMapper.updateDeptPerm(tsysDeptPerm);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param deptIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteTsysDeptPermByDeptIds(String[] deptIds)
    {
        return deptPermMapper.clearDeptPerm(deptIds);
    }
    @Override
    public List<AccDept> selectDeptAccPermList(AccDept accDept) {
        return deptPermMapper.selectDeptAccPermList(accDept);
    }
    @Override
    public List<GroupDept> selectDeptGroupPermList(GroupDept groupDept) {
        return deptPermMapper.selectDeptGroupPermList(groupDept);
    }

    @Override
    public List<IrcDept> selectDeptIrcPermList(IrcDept ircDept) {
        return deptPermMapper.selectDeptIrcPermList(ircDept);
    }

    @Override
    public List<DivDept> selectDeptDivPermList(DivDept divDept) {
        return deptPermMapper.selectDeptDivPermList(divDept);
    }

    @Override
    public List<VlsDept> selectDeptVlsPermList(VlsDept vlsDept) {
        return deptPermMapper.selectDeptVlsPermList(vlsDept);
    }

    @Override
    public int clearDeptPermDetail(String[] deptIds)
    {
        return deptPermMapper.clearDeptPermDetail(deptIds);
    }


    @Override
    public List<Map> selectAllAccount() {
        return deptPermMapper.selectAllAccount();
    }

    @Override
    public List<Map> selectAllGroup() {
        return deptPermMapper.selectAllGroup();
    }

    @Override
    public List<Map> selectAllCfg() {
        return deptPermMapper.selectAllCfg();
    }

    /**
     * 删除
     *
     * @param deptId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteTsysDeptPermByDeptId(String deptId)
    {
        return deptPermMapper.deleteDeptPermById(deptId);
    }

    @Override
    public List<CfgDept> selectDeptCfgPermList(CfgDept cfgDept) {
        return deptPermMapper.selectDeptCfgPermList(cfgDept);
    }
}
